package com.ycsd.invest.order.business.formplugin;

import kd.bos.form.control.Control;
import kd.bos.form.plugin.AbstractFormPlugin;

import java.util.EventObject;

public class TestAlert extends AbstractFormPlugin {

    @Override
    public void registerListener(EventObject e) {
        this.addClickListeners("btnok");
    }

    @Override
    public void click(EventObject evt) {
        String key = ((Control) evt.getSource()).getKey();
        if ("btnok".equals(key)) {
            this.getView().returnDataToParent(this.getModel().getValue("ycsd_textfield"));
            //触发父页面关闭
            this.getView().close();
        }
    }
}
